local _M = {}
_M.__index = _M

function _M.new()
    return setmetatable({}, _M)
end

function _M:json(data)
    ngx.header["Content-Type"] = "application/json"
    ngx.say(require("cjson").encode(data))
end

return _M